﻿using Service.Repository;
using SqlSugar;

namespace Service.Auth.Domain.AggregatesModel
{
    /// <summary>
    /// 角色菜单（按钮）关联表
    /// </summary>
    [SugarTable("tb_role_permission")]
    public class RolePermission : Entity, IAggregateRoot
    {
        public RolePermission()
        {
        }

        public RolePermission(long roleId, long permissionId)
        {
            RoleId = roleId;
            PermissionId = permissionId;
        }

        /// <summary>
        ///  角色id
        ///</summary>
        [SugarColumn(ColumnName = "role_id", IsPrimaryKey = true)]
        public long RoleId { get; private set; }


        /// <summary>
        ///  菜单id
        ///</summary>
        [SugarColumn(ColumnName = "permission_id", IsPrimaryKey = true)]
        public long PermissionId { get; private set; }

    }
}
